home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / dos / notify.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  3KB  |  115 lines

  1. #ifndef DOS_NOTIFY_H
  2. #define DOS_NOTIFY_H 1
  3. /*
  4. ** notify.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/02/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for notify.h
  17. */
  18. #ifndef NotifyMessagePtr
  19. #define NotifyMessagePtr ADDRESS
  20. #endif
  21. #ifndef NotifyRequestPtr
  22. #define NotifyRequestPtr ADDRESS
  23. #endif
  24. #ifndef nr_Msg_StructPtr
  25. #define nr_Msg_StructPtr ADDRESS
  26. #endif
  27. #ifndef nr_Signal_StructPtr
  28. #define nr_Signal_StructPtr ADDRESS
  29. #endif
  30. /*
  31. ** End of StructPointer defines for notify.h
  32. */
  33.         
  34. #ifndef EXEC_TYPES_H
  35. #include <exec/types.h>
  36. #endif
  37.  
  38. #ifndef EXEC_PORTS_H
  39. #include <exec/ports.h>
  40. #endif
  41.  
  42. #ifndef EXEC_TASKS_H
  43. #include <exec/tasks.h>
  44. #endif
  45.  
  46.  
  47.  
  48. /* use of Class and code is discouraged for the time being - we might want to
  49.    change things */
  50. /* --- NotifyMessage Class ------------------------------------------------ */
  51. #define NOTIFY_CLASS    &H40000000
  52.  
  53. /* --- NotifyMessage Codes ------------------------------------------------ */
  54. #define NOTIFY_CODE &H1234
  55.  
  56.  
  57. /* Sent to the application if SEND_MESSAGE is specified.            */
  58.  
  59. STRUCT NotifyMessage  
  60.     _Message nm_ExecMessage 
  61.     LONGINT  nm_Class 
  62.     SHORTINT  nm_Code 
  63.     NotifyRequestPtr  nm_NReq   /* don't modify the request! */
  64.     LONGINT  nm_DoNotTouch        /* like it says!  For use by handlers */
  65.     LONGINT  nm_DoNotTouch2       /* ditto */
  66. END STRUCT 
  67.  
  68. /* Do not modify or reuse the notifyrequest while active.           */
  69. /* note: the first LONGINT of nr_Data has the length transfered            */
  70.  
  71. STRUCT nr_Msg_Struct  
  72.     MsgPortPtr  nr_Port 
  73. END STRUCT 
  74.  
  75. STRUCT nr_Signal_Struct  
  76.     TaskPtr  nr_Task 
  77.     BYTE   nr_SignalNum 
  78.     STRING nr_Pad SIZE 3  
  79. END STRUCT 
  80.  
  81. STRUCT NotifyRequest  
  82.     ADDRESS   nr_Name 
  83.     ADDRESS   nr_FullName      /* set by dos - don't touch */
  84.     LONGINT nr_UserData       /* for applications use */
  85.     LONGINT nr_Flags 
  86.     STRING nr_stuff SIZE 8  
  87.     STRING nr_Reserved SIZE 16  /* 4*SIZEOF(LONGINT) */       /* leave 0 FOR now */
  88.  
  89.     /* internal use by handlers */
  90.     LONGINT nr_MsgCount       /* # of outstanding msgs */
  91.     MsgPortPtr  nr_Handler  /* handler sent to (for EndNotify) */
  92. END STRUCT 
  93.  
  94. /* --- NotifyRequest Flags ------------------------------------------------ */
  95. #define NRF_SEND_MESSAGE    1
  96. #define NRF_SEND_SIGNAL     2
  97. #define NRF_WAIT_REPLY      8
  98. #define NRF_NOTIFY_INITIAL  16
  99.  
  100. /* do NOT set or remove NRF_MAGIC!  Only for use by handlers! */
  101. #define NRF_MAGIC   &H80000000
  102.  
  103. /* bit numbers */
  104. #define NRB_SEND_MESSAGE    0
  105. #define NRB_SEND_SIGNAL     1
  106. #define NRB_WAIT_REPLY      3
  107. #define NRB_NOTIFY_INITIAL  4
  108.  
  109. #define NRB_MAGIC       31
  110.  
  111. /* Flags reserved for private use by the handler: */
  112. #define NR_HANDLER_FLAGS    &Hffff0000
  113.  
  114. #endif /* DOS_NOTIFY_H */
  115.